codebase conventions - #130
Open
corresp0nd wants to merge 2 commits into
Open
Conversation
sleepyyapril
reviewed
Aug 5, 2026
|
|
||
| ### Use `partial` classes to namespace clean C# edits | ||
|
|
||
| If you are adding a new method to an already existing upstream system (either from WizDen or Macrocosm), you may be asked to move it to a partial system under our namespace. This means you would create a new file in our file structure, and then change the namespace declaration to match the original system. This allows you to cleanly extended the system and its using directives without having to copy paste everything over. |
There was a problem hiding this comment.
Suggested change
| If you are adding a new method to an already existing upstream system (either from WizDen or Macrocosm), you may be asked to move it to a partial system under our namespace. This means you would create a new file in our file structure, and then change the namespace declaration to match the original system. This allows you to cleanly extended the system and its using directives without having to copy paste everything over. | |
| If you are adding a new method to an already existing upstream class (either from WizDen or Macrocosm), you may be asked to move it to a partial class under our namespace. This means you would create a new file in our file structure, and then change the namespace declaration to match the original system. This allows you to cleanly extend the class and its using directives without having to copy paste everything over. |
|
|
||
| ## Use the `Fu` prefix to replace entities or locale | ||
|
|
||
| There are times when entities change so drastically from their upstream version that it is easier to create new entities entirely. When we do this, we add the `Fu` prefix to the new entity id and create it in our namespace. You would then replace all of the usages of the old entity with the new id. |
There was a problem hiding this comment.
hehe. no review. just funny. Fu. Hehe.
|
|
||
| There are times when entities change so drastically from their upstream version that it is easier to create new entities entirely. When we do this, we add the `Fu` prefix to the new entity id and create it in our namespace. You would then replace all of the usages of the old entity with the new id. | ||
|
|
||
| To "remove" the old entity, you can then make it abstract by adding `abstract: true` to the entity, or bulk abstract the entire file by adding it to `ignoredPrototypes.yml`. You can also add a line in `migration.yml` to migrate the old entity to the new one, for example adding the line `ClothingOuterWinterHos: FuClothingOuterWinterHos`. |
There was a problem hiding this comment.
in my experience migrations bad but specifically for replacing content its good
|
|
||
| ## Content should be properly commented | ||
|
|
||
| All code should have comments explaining *what* and *why* it is doing. Do not assume that code is self-documenting. Readable variable and class names is always good practice, but even with that, not all code is self-documenting. This also lessens the burden on your fellow contributors and maintainers; none of us are omnipresent and can immediately understand what you intended to do. Commenting your code, and even including some of your thought process, can help everyone better build and improve the codebase. |
There was a problem hiding this comment.
its already difficult to get people to comment methods, you should probably only enforce that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
list of what we expect from prs / code in general & explanations why